/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

import java.util.logging.Level;
import java.util.logging.Logger;
import java.sql.*;

/**
 *
 * @author rogu0903
 */
public class MySqlListener implements Runnable{
// private  Connection con ;
//   private  Statement st ;
//   private  ResultSet rs;
//   private  Statement s;
   private  ResultSet rs;
   private  Statement s;

    public void run() {
       while(true){
    	   
       
    	   try {
    		   		s = Version.con.createStatement ();
    		   		s.executeQuery("SELECT lastupdate id FROM version");

    		   		rs = s.getResultSet ();
    		   		rs.next ();
    		   		System.out.println(rs.getDate("lastupdate"));
//        if (rs.getDate("lastupdate")==){
//
//        }
            } catch (SQLException ex) {
            Logger.getLogger(MySqlListener.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    }

}
